Kivy Dynamic Widget - Widget resizing when children are added
I am trying to write a dynamic widget which can add multiple choice question to gridlayout, which in turn will be displayed in scroll view. Everything works correctly except for when app is run, height of widgets displayed is too big, and it comes to correct value only after window resizing. Please let me know what am I doing wrong.
#main.py
from kivy.app import App from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label from kivy.uix.scrollview import ScrollView
class Mcq2App(App): def build(self): DR = DisplayRoot() DR.add_widget(Mcq2('Q1'*500,'A1','A2','X')) ## DR.add_widget(Mcq2('Q2'*500,'A1','A2','Y')) ## DR.add_widget(Mcq2('Q3'*500,'A1','A2','Z')) SS = ScrollScreen() SS.add_widget(DR) return SS